<?php

class Common extends CI_Controller {

    public function unauthorized() {
        $template_data['title'] = "Acceso no autorizado"; // Capitalize first letter
        $template_data['content'] = $this->load->view('common/unauthorized', array(), True);
        $this->load->view('templates/main', $template_data);
    }

    public function home() {
        $menu_data['menu'] = 'Home';
        $template_data['menu'] = $this->load->view('common/menu', $menu_data, TRUE);
        
        $content_data['msg'] = "Welcome, dear registered user! Now, you are logged in... ";
        $template_data['content'] = $this->load->view('common/home', $content_data, TRUE);

        $this->load->view('templates/template', $template_data);

        /* // Authetication succeed, go to private area
          $template_data['title'] = 'Sesión iniciada';
          //   $template_data['content'] = $this->load->view('common/home', array(), True);
          $this->load->view('templates/template', $template_data); */
    }

}

?>
